<?php if (!defined('BASEPATH'))
    exit('No direct script access allowed');

function admin_page_uri($slug)
{
    return ADMIN_FOLDER . $slug;
}

function admin_post_url($slug)
{
    return base_url(ADMIN_FOLDER . POST_SLUG . '/' . $slug) . config_item('url_suffix');
}
function admin_post_paging_url()
{
    return base_url(ADMIN_FOLDER . POST_SLUG . '/trang');
}
function admin_post_search_paging_url()
{
    return base_url(ADMIN_FOLDER . POST_SLUG . '/tim-kiem/trang');
}
function admin_post_cate_url($slug = null)
{
    if ($slug == null) {
        return base_url(ADMIN_FOLDER . POST_SLUG . '/' . CATEGORY_SLUG) . config_item('url_suffix');
    }
    return base_url(ADMIN_FOLDER . POST_SLUG . '/' . CATEGORY_SLUG . '/' . $slug) .
        config_item('url_suffix');
}

function admin_user_paging_url()
{
    return base_url(ADMIN_FOLDER . USER_SLUG) . '/trang';
}
function admin_user_search_paging_url()
{
    return base_url(ADMIN_FOLDER . USER_SLUG) . '/tim-kiem/trang';
}

function admin_category_url($slug = null)
{
    if ($slug == null) {
        return base_url(ADMIN_FOLDER . CATEGORY_SLUG) . config_item('url_suffix');
    }
    return base_url(ADMIN_FOLDER . CATEGORY_SLUG . '/' . $slug) . config_item('url_suffix');
}

function admin_product_paging_url()
{
    return base_url(ADMIN_FOLDER . PRODUCT_SLUG . '/trang');
}
function admin_product_search_paging_url()
{
    return base_url(ADMIN_FOLDER . PRODUCT_SLUG . '/tim-kiem/trang');
}
function admin_product_single_url($slug)
{
    return base_url(ADMIN_FOLDER . PRODUCT_SLUG . '/p/' . $slug) . config_item('url_suffix');
}

function admin_shop_single_url($slug)
{
    return base_url(ADMIN_FOLDER . SHOP_SLUG . '/' . $slug) . config_item('url_suffix');
}
function admin_shop_paging_url()
{
    return base_url(ADMIN_FOLDER . SHOP_SLUG . '/trang');
}

function admin_order_paging_url()
{
    return base_url(ADMIN_FOLDER . ORDER_SLUG . '/trang');
}
function admin_order_search_paging_url()
{
    return base_url(ADMIN_FOLDER . ORDER_SLUG . '/tim-kiem/trang');
}
function admin_shop_order_paging_url($shop_slug)
{
    return base_url(ADMIN_FOLDER . ORDER_SLUG . '/' . $shop_slug . '/trang');
}

function admin_contact_paging_url()
{
    return base_url(ADMIN_FOLDER . CONTACT_SLUG . '/trang');
}

function admin_rao_vat_paging_url()
{
    return base_url(ADMIN_FOLDER . RAOVAT_SLUG . '/trang');
}
function admin_rao_vat_highlight_paging_url()
{
    return base_url(ADMIN_FOLDER . RAOVAT_SLUG . '/' . RAOVAT_HIGHLIGHT_SLUG .
        '/trang');
}
function admin_rao_vat_search_paging_url()
{
    return base_url(ADMIN_FOLDER . RAOVAT_SLUG . '/tim-kiem/trang');
}
function admin_raovat_single_url($slug)
{
    return base_url(ADMIN_FOLDER . RAOVAT_SLUG . '/' . $slug) . config_item('url_suffix');
}

function admin_advertise_single_url($slug)
{
    return base_url(ADMIN_FOLDER . ADVERTISE_SLUG . '/' . $slug) . config_item('url_suffix');
}

function get_upload_advertise($name)
{
    return base_url(UPLOAD_FOLDER_URL . ADVERTISE_FOLDER_URL . $name);
}

?>